home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / owldlgs.zip / DLGMAIN.CPP < prev    next >
C/C++ Source or Header  |  1993-04-08  |  2KB  |  39 lines

  1. /**********************************************************************/
  2. /*                  Dlgmain.cpp by Bob Bourbonnais                    */
  3. /*              released to the public domain 12/12/91                */
  4. /*            This program shows how to make a dialog box             */
  5. /*                      into the main window.                         */
  6. /**********************************************************************/
  7. #include <owl.h>
  8. #include <dialog.h>
  9.  
  10. class TDialog1App : public TApplication  // Application Class to contain
  11.   {                                      // the application
  12.   public:
  13.     TDialog1App(LPSTR lpName, HANDLE hInstance,  // constructor calls the
  14.         HANDLE hPrevInstance,            // base class constructor
  15.         LPSTR lpCmdLine, int nCmdShow)
  16.         :TApplication(lpName, hInstance,
  17.                   hPrevInstance,
  18.                   lpCmdLine, nCmdShow) {};
  19.  
  20.     virtual void InitMainWindow(); // overrides base class InitMainWindow
  21.   };
  22.  
  23. void TDialog1App::InitMainWindow() // to initialize a dialog box
  24.   {                                // as the main window
  25.   MainWindow = new TDialog(NULL, "MAINWINDOWDIALOG");
  26.   }
  27.  
  28. int PASCAL WinMain(HANDLE hInstance,              // main entry point from
  29.            HANDLE hPrevInstance,          // windows to this program
  30.            LPSTR lpCmdLine , int nCmdShow)
  31.   {
  32.   TDialog1App Dialog1("Dialog Tester",hInstance,  // create instance of
  33.                hPrevInstance,             // the dialog application
  34.                lpCmdLine,nCmdShow);
  35.   Dialog1.Run();                                  // run it
  36.   return (Dialog1.Status);                        // exit
  37.   }
  38. /**********************************************************************/
  39.